
//
//  FiveTableViewCell.m
//  GoShops
//
//  Created by mac22 on 14/11/17.
//  Copyright (c) 2014年 郑朝军. All rights reserved.
//

#import "FiveTableViewCell.h"
#import "Grouble.h"
@interface FiveTableViewCell()
@property (nonatomic,weak)UILabel * myLable;
@end
@implementation FiveTableViewCell

+ (instancetype)FiveTableViewCell:(UITableView *)tableView
{
    static NSString *ID = @"fivecell";
    FiveTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[FiveTableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    // 设置不能选中,选中每反应
    cell.selectionStyle = UITableViewCellSelectionStyleNone;

    return cell;
}


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.userInteractionEnabled = NO;
        UIView * backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, 44)];
        [self addSubview:backView];
        NSString * str = @"猜你喜欢";
        CGSize strSize = [str sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:20]}];
        
        UILabel * myLable = [[UILabel alloc]initWithFrame:CGRectMake(5, backView.frame.size.height * 0.5,strSize.width, strSize.height)];
        myLable.text = str;
        
        myLable.font = [UIFont systemFontOfSize:18];
        myLable.numberOfLines = 0;
        myLable.textColor = ZCJColor(250, 175, 187);
        [backView addSubview:myLable];
        self.myLable = myLable;
        // Initialization code
    }
    return self;
}
- (void)setTopName:(NSString *)topName
{
    _topName = topName;
    self.myLable.text = topName;
    self.myLable.textColor = [UIColor blackColor];
}
- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
